/**    
* @Title: AbstractConfRepository.java  
* @Package com.kaver.spring   
* @author roc   
* @date 2019年1月30日 下午5:19:15  
* @version V1.0  
* @copyright kaver 
*/
package com.kaver.spring;

import java.util.Properties;

/**  
* @ClassName: AbstractConfRepository  
* @Description: 配置仓库 
* @author roc  
* @date 2019年1月30日 下午5:19:15  
*    
*/
public abstract class AbstractConfRepository implements ConfRepository{
	
	private Properties properties = new Properties();
	
	public String get(String key) {
		return properties.getProperty(key);
	}
	public Properties getProperties() {
		return properties;
	}
	@Override
	public void merge(Properties properties) {
		if (properties == null) {
			return;
		}
		Properties me = this.getProperties();
		if (!me.isEmpty()) {
			for (Object key : me.keySet()) {
				properties.put(key, me.get(key));
			}
		}
	}
}
